<?php
$screenflow = $uiObj;
$i = 0;
$tabs = array();

foreach ($uiObj->screens as $screen) {
    $tab = array();
    $tab['label'] = $screen['name'];
    //$url = $screenflow->getUrl(array('screenFlowIndex' => $i));
    $ajaxLink = $screenflow->getUrl(array('screenFlowIndex' => $i, 'ajaxLink' => TRUE));
    //$tab['url'] = CHtml::normalizeUrl($url);
    $tab['ajaxLink'] = $ajaxLink;
    $index = $screenflow->getIndex();
    if ($i == $index)
        $tab['active'] = 'active';
    else
        $tab['active'] = '';
    $i++;
    array_push($tabs, $tab);
}
?>
<div class="pagination pagination">          
    <ul>
        <?php foreach ($tabs as $tab) { ?>                
            <li class="<?php echo $tab['active']; ?>"><?php echo $tab['ajaxLink']; ?></li>                
        <?php } ?>
    </ul>        
</div>
<?php
$uiObj->renderView('screenflowLayoutList', array('uiObj' => $uiObj));
?>
